/**
 * import 相当于预处理 最先完成 且有先后顺序
 * 早于主线程的开始
 */
/**
 * import m1 { m2 } * as m3 from 'xxx'
 * import * 会把所有导出包括default 一起整合到一个 {} 里
 * import 'xxx' 导入上下文
 */
import Vue from 'vue'
import i18n from '@/assets/lang' // 导入语言包
// import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import 'animate.css/animate.min.css' // animate.css compressed
import './style/index.scss' // global css

import '@/components/ui.js' // 按需加载element-ui组件
import 'element-ui/lib/theme-chalk/index.css' // element-ui样式表
import 'element-ui/lib/theme-chalk/display.css' // 基于断点的动态现实隐藏样式表
import '@/assets/fonts/icon-version2/iconfont.css'  // 导入字体文件

import '@/components' // 导入自定义组件

import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import $req from '@/utils/request'
import axios from 'axios'
import http from '@/utils/http'

import '@/utils/lodash' //按需导入lodash函数
import './permission'
import '@/utils/clickoutside' // 全局注册clickoutside指令
import publicMethod from '@/utils/public'


import eventbus from '@/utils/plugin/eventbus.js'
Vue.use(eventbus)

console.log(process.env)
Object.assign(Vue.prototype, {
  $req,
  axios,
}, http, publicMethod)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  i18n, // 语言包对象
  render: h => h(App)
}).$mount('#app')
